package com.thinkgem.jeesite.modules.act.utils;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

/**
 * 物流信息查询
 *
 * @ProjectName: merchant
 * @Package: com.thinkgem.jeesite.modules.act.utils
 * @ClassName: ExpressUtil
 * @Description: 物流信息查询
 * @Author: lxr
 * @CreateDate: 2018-10-18 14:12
 * @UpdateUser: lxr
 * @UpdateDate: 2018-10-18 14:12
 * @UpdateRemark: The modified content
 * @Version: 1.0
 **/
public class ExpressUtil {

    public static String getExpress(String courier, String courierNumber) {
        Document jsondoc;
        String jsonData = null;
        try {
            jsondoc = Jsoup.connect("http://www.kuaidi100.com/query?type=" + courier + "&postid=" + courierNumber).timeout(10000).get();
            jsonData = jsondoc.text();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return jsonData;
    }


}
